<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models\Order;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

/**
 * Class OrderItem
 *
 * @property int $id
 * @property int $order_id
 * @property int $user_id
 * @property int $order_number
 * @property int $itemable_type
 * @property int $itemable_id
 * @property int $coupon_id
 * @property float $coupon_money
 * @property int $user_coupon_id
 * @property float $item_money
 * @property float $item_pay_money
 * @property Carbon $created_at
 * @property Carbon $updated_at
 *
 * @package App\Models
 */
class OrderItem extends Model
{
	protected $table = 'order_items';

	protected $casts = [
		'order_id' => 'int',
		'user_id' => 'int',
		'order_number' => 'int',
		'itemable_type' => 'int',
		'itemable_id' => 'int',
		'coupon_id' => 'int',
		'coupon_money' => 'float',
		'user_coupon_id' => 'int',
		'item_money' => 'float',
		'item_pay_money' => 'float'
	];

	protected $fillable = [
		'order_id',
		'user_id',
		'order_number',
		'itemable_type',
		'itemable_id',
		'coupon_id',
		'coupon_money',
		'user_coupon_id',
		'item_money',
		'item_pay_money'
	];
}
